package com.entor.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.entor.model.Prive;
import com.entor.service.PriveService;

@RequestMapping("/pc")
@Controller
public class PriveController extends BaseController<Prive>{
	
	@Autowired
	private PriveService ps;
	
	@Override
	public List<Prive> find(Prive t) {
		return ps.find(t);
	}
	
	@RequestMapping("/getCode/{code}")
	@ResponseBody
	public String getCode(@PathVariable(value="code") String code){
		return ps.getCode(code);
	}

}
